
package com.market.dao;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.market.bean.Productcritique;
import com.market.dao.hibernate.GenericDaoHibernate;

/**
 * Data access object (DAO) for domain model class Productcritique.
 * 
 * @see com.market.bean.Productcritique
 * @author MyEclipse - Hibernate Tools
 */
public class ProductcritiqueDAO extends GenericDaoHibernate<Productcritique, Long> implements IProCriDAO
{

    public ProductcritiqueDAO(Class<Productcritique> persistentClass)
    {
        super(persistentClass);
        // TODO Auto-generated constructor stub
    }

    public ProductcritiqueDAO()
    {
        super();
    }
    
    private static final Logger log = LoggerFactory.getLogger(ProductcritiqueDAO.class);

    // property constants
    public static final String NAME = "name";

    public static final String CRITIQUE = "critique";

    protected void initDao()
    {
        // do nothing
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.market.dao.IProCriDAO#findById(java.lang.Long)
     */
    public Productcritique findById(long id)
    {
        log.debug("getting Productcritique instance with id: " + id);
        try
        {
            Productcritique instance = (Productcritique)getHibernateTemplate().get("com.market.bean.Productcritique",
                    new Long(id));
            return instance;
        }
        catch (RuntimeException re)
        {
            log.error("get failed", re);
            throw re;
        }
    }
}
